<?php
//producer request find all

echo '<h1>Outstanding Producer Privileges Requests</h1>';

echo '<p>These producers are awaiting approval to sell with the Co-op.</p>';

echo '<table>';

echo $html->tableHeaders(
	array(
		'Business Name',
		'Member Name', 
		'Phone (home)',
		'Phone (work)',  
		'Actions'
	)
);


$requestTable = array();

foreach($requests as $request) {
	$mname = $request['Member']['first_name'] . ' ' . $request['Member']['last_name'];
	$requestTable[] = array(
		$request['ProducerRequest']['business_name'],
		$html->link($mname, 'mailto:' . $request['Member']['email_address'] . '?subject=WMCoop%20Producer%20Request', array('title'=>'email ' . $mname)),
		$request['Member']['home_phone'],
		$request['Member']['work_phone'],
		$html->link('[Approve]', '/producerRequests/respond/' . $request['ProducerRequest']['id'])
	);
}

echo $html->tableCells($requestTable);

echo '</table>';

?>